"use strict";
//?? 枚举
// enum Direction{
//     up=1,
//     down,
//     left,
//     right
// }
// console.log(Direction.up,Direction.down,Direction.left,Direction.right)
// enum dir {
//     up='up',
//     down='down'
// }
// console.log(dir.up,dir.down)
// enum E {
//     X, Y, Z
// }
// function f(obj: { X: number }) {
//     return obj.X;
// }
// // Works, since 'E' has a property named 'X' which is a number.
// f(E);
var Enum;
(function (Enum) {
    Enum[Enum["A"] = 0] = "A";
})(Enum || (Enum = {}));
var a = Enum.A;
var enuma = Enum[a];
console.log(enuma);
var directions = [0 /* up */, 1 /* down */, 2 /* left */, 3 /* right */];
console.log(directions);
var items = [1, 2, 3];
items.forEach(function (item, index, array) { return console.log(item); });
items.forEach(function (item) { return console.log(item); });
function invoke(args, callback) {
    callback();
}
invoke([1, 3], function (x, y) { console.log(x + ',' + y); });
invoke([1, 5], function (x, y) { return console.log(x + ',' + y); });
